package fr.isima.myextant;

import java.io.IOException;

import fr.isima.myant.Task;

public class CompileTask extends Task{
	private String file;
	
	public CompileTask() {}
	
	public void setFile(String file) {
		this.file = file;
	}
	
	@Override
	public void execute() {
		try {
			Process p = Runtime.getRuntime().exec("javac " + file);
			p.waitFor();
		} catch (IOException | InterruptedException e) {
			e.printStackTrace();
		}
	}
}
